home *** CD-ROM | disk | FTP | other *** search
- /* dec.h - dynamic definitions and declarations */
-
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <math.h>
-
- #define FALSE 0
- #define TRUE 1
- #define NO_REPORT -1
-
- #define K 1024
- #define MAXSIZE 8*K
- /* All of the tweaking is done here */
- #define UNIT 1
- #define EPSILON 1
- #define THRESHOLD UNIT*50
-
- #define READ_MODE "r"
- #define WRITE_MODE "w"
- #define APPEND_MODE "a"
-
- #define MIN2(a, b) (((a) < (b)) ? (a) : (b))
- #define MIN3(a, b, c) ((MIN2((a), (b)) < (c)) ? MIN2((a), (b)) : (c))
- #define MAX2(a, b) (((a) > (b)) ? (a) : (b))
-
- #define NIL_POINTER 0L
- #define NIL_STRING "\p"
- #define IGNORED_STRING NIL_STRING
- #define NIL_FILE_FILTER NIL_POINTER
- #define NIL_DIALOG_HOOK NIL_POINTER
- #define VDAT_RES_ID 0
-
- typedef long **MATRIX;
-
- void initialize(), clear_table(), vResCheck(), allocate_table(), error_message(), exit_cleanly(), main();
- char open_file(), compare();
- int read_array();
-
- int copy_array(array1, array2, bytes_left)
- char array1[], array2[];
- int *bytes_left;
- {
- int bytes_gotten = 0;
- if (!(*bytes_left))
- return (FALSE);
- if (*bytes_left < MAXSIZE)
- {
- memmove ((void *)array2, (void *)array1, (size_t)(*bytes_left));
- bytes_gotten = *bytes_left;
- *bytes_left = 0;
- }
- else
- {
- memmove ((void *)array2, (void *)array1, (size_t)MAXSIZE);
- bytes_gotten = MAXSIZE;
- *bytes_left -= MAXSIZE;
- }
- return (bytes_gotten);
- }
-
-